//
// @Auther: by wujehy 
// @Email:wujehy@qq.com
// @Data:20-4-2
// @Time:上午10:19
//

#ifndef E2EEMESSAGE_COMMONTYPE_H
#define E2EEMESSAGE_COMMONTYPE_H

/**
 * @brief E2EE 使用到的 关键类型
 */

#include <iostream>
#include <map>
#include <memory>

// 存放 基础 公私钥对的 数据结构
struct KeyPairDataType {
    std::string publicKey;
    std::string privateKey;
};

namespace GeeJoan
{
    namespace E2EE
    {
        namespace Common
        {
            class E2EEControlBase;

            class E2EESessionBase;

            class E2EEBase {
                std::map<std::string, E2EESessionBase *> sessionMap;

            public:

                virtual KeyPairDataType getMIdk() = 0;

                virtual KeyPairDataType getMSpk() = 0;

                virtual KeyPairDataType getMOpk() = 0;

            };

            class E2EESessionBase {
                friend E2EEControlBase;
            public:
                virtual int setOtherIdkPub(const std::string &otherIdkPub) = 0;

                virtual int setOtherSpkPub(const std::string &otherSpkPub) = 0;

                virtual int setOtherOpkPub(const std::string &otherEpkPub) = 0;
            };
        }
    }


}
#endif //E2EEMESSAGE_COMMONTYPE_H
